var eventsMgr = require('eventsMgr');
cc.Class({
    extends: cc.Component,

    properties: {
    },

    // use this for initialization
    onLoad: function () {
        eventsMgr.on('game_over',this._onGameOver,this);
    },
    onDestroy(){
        eventsMgr.off('game_over',this._onGameOver);
    },
    backClick(){
        if (window.xiaobuJs){
            cc.log('支持小步游戏Api，返回');
            window.xiaobuJs.back();
        }else{
            cc.log('不支持小步游戏Api');
        }
    },
    _onGameOver(){
        this.node.active = false;
    }
});
